<template>
  <div class="message-reply-feedback">
    <!-- 统计卡片 -->
    <div class="statistics-section">
      <div class="stat-cards">
        <div class="stat-card">
          <div class="stat-icon" style="background: #409EFF;">
            <i class="el-icon-message"></i>
          </div>
          <div class="stat-info">
            <div class="stat-value">{{ statistics.totalMessages }}</div>
            <div class="stat-label">收到消息</div>
          </div>
        </div>
        <div class="stat-card">
          <div class="stat-icon" style="background: #F56C6C;">
            <i class="el-icon-warning"></i>
          </div>
          <div class="stat-info">
            <div class="stat-value">{{ statistics.unreadMessages }}</div>
            <div class="stat-label">未读消息</div>
          </div>
        </div>
        <div class="stat-card">
          <div class="stat-icon" style="background: #67C23A;">
            <i class="el-icon-circle-check"></i>
          </div>
          <div class="stat-info">
            <div class="stat-value">{{ statistics.repliedMessages }}</div>
            <div class="stat-label">已回复</div>
          </div>
        </div>
        <div class="stat-card">
          <div class="stat-icon" style="background: #E6A23C;">
            <i class="el-icon-time"></i>
          </div>
          <div class="stat-info">
            <div class="stat-value">{{ statistics.pendingMessages }}</div>
            <div class="stat-label">待处理</div>
          </div>
        </div>
      </div>
    </div>

    <!-- 筛选区 -->
    <div class="filter-section">
      <div class="filter-tabs">
        <div 
          v-for="tab in filterTabs" 
          :key="tab.value"
          class="filter-tab"
          :class="{ active: currentFilter === tab.value }"
          @click="handleFilterChange(tab.value)"
        >
          <i :class="tab.icon"></i>
          <span>{{ tab.label }}</span>
          <span v-if="tab.count > 0" class="tab-badge">{{ tab.count }}</span>
        </div>
      </div>
    </div>

    <!-- 消息列表 -->
    <div class="messages-section">
      <div class="section-header">
        <div class="section-title">
          <i class="el-icon-chat-line-square"></i>
          <span>消息列表</span>
          <span class="result-count">共 {{ filteredMessages.length }} 条</span>
        </div>
      </div>

      <div v-if="filteredMessages.length === 0" class="empty-result">
        <i class="el-icon-document-delete"></i>
        <p>暂无消息</p>
      </div>

      <div v-else class="message-list">
        <div 
          v-for="message in filteredMessages" 
          :key="message.id"
          class="message-card"
          :class="{ unread: !message.isRead }"
          @click="viewMessageDetail(message)"
        >
          <div class="card-header">
            <div class="message-type-row">
              <el-tag :type="getTypeTagType(message.type)" size="mini">
                <i :class="getTypeIcon(message.type)"></i>
                {{ message.type }}
              </el-tag>
              <el-tag :type="getPriorityType(message.priority)" size="mini">
                {{ message.priority }}
              </el-tag>
              <span v-if="!message.isRead" class="unread-dot"></span>
            </div>
            <div class="message-title">{{ message.title }}</div>
          </div>

          <div class="card-body">
            <div class="message-content">{{ message.content }}</div>
            <div class="info-row">
              <i class="el-icon-user"></i>
              <span>发送人：{{ message.sender }}</span>
            </div>
            <div class="info-row">
              <i class="el-icon-time"></i>
              <span>{{ message.sendTime }}</span>
            </div>
          </div>

          <div class="card-footer">
            <div class="footer-left">
              <el-tag 
                :type="getStatusTagType(message.replyStatus)" 
                size="mini"
              >
                {{ message.replyStatus }}
              </el-tag>
            </div>
            <div class="footer-right">
              <el-button 
                type="text" 
                size="small"
                icon="el-icon-chat-dot-round"
                @click.stop="quickReply(message)"
              >
                快速回复
              </el-button>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 消息详情对话框 -->
    <el-dialog
      :title="currentMessage ? currentMessage.title : '消息详情'"
      :visible.sync="showDetailDialog"
      width="95%"
      top="5vh"
      center
      :close-on-click-modal="false"
      custom-class="detail-dialog"
    >
      <div v-if="currentMessage" class="detail-content">
        <!-- 基本信息 -->
        <div class="detail-section">
          <div class="detail-header">基本信息</div>
          <div class="detail-item">
            <span class="label">消息编号：</span>
            <span class="value">{{ currentMessage.id }}</span>
          </div>
          <div class="detail-item">
            <span class="label">消息类型：</span>
            <el-tag :type="getTypeTagType(currentMessage.type)" size="small">
              {{ currentMessage.type }}
            </el-tag>
          </div>
          <div class="detail-item">
            <span class="label">优先级：</span>
            <el-tag :type="getPriorityType(currentMessage.priority)" size="small">
              {{ currentMessage.priority }}
            </el-tag>
          </div>
          <div class="detail-item">
            <span class="label">发送人：</span>
            <span class="value">{{ currentMessage.sender }}</span>
          </div>
          <div class="detail-item">
            <span class="label">发送时间：</span>
            <span class="value">{{ currentMessage.sendTime }}</span>
          </div>
          <div class="detail-item">
            <span class="label">回复状态：</span>
            <el-tag :type="getStatusTagType(currentMessage.replyStatus)" size="small">
              {{ currentMessage.replyStatus }}
            </el-tag>
          </div>
        </div>

        <!-- 消息内容 -->
        <div class="detail-section">
          <div class="detail-header">消息内容</div>
          <div class="message-content-detail">{{ currentMessage.content }}</div>
        </div>

        <!-- 反馈历史 -->
        <div class="detail-section" v-if="currentMessage.feedbackHistory && currentMessage.feedbackHistory.length > 0">
          <div class="detail-header">反馈历史</div>
          <div class="feedback-timeline">
            <div 
              v-for="(feedback, index) in currentMessage.feedbackHistory" 
              :key="index"
              class="feedback-item"
            >
              <div class="feedback-time">{{ feedback.time }}</div>
              <div class="feedback-content">
                <div class="feedback-user">{{ feedback.user }}</div>
                <div class="feedback-text">{{ feedback.content }}</div>
              </div>
            </div>
          </div>
        </div>

        <!-- 回复区域 -->
        <div class="detail-section">
          <div class="detail-header">我的回复</div>
          <el-input
            v-model="replyContent"
            type="textarea"
            :rows="5"
            placeholder="请输入回复内容..."
            maxlength="500"
            show-word-limit
          ></el-input>
          
          <!-- 快捷回复选项 -->
          <div class="quick-reply-options">
            <div class="quick-reply-label">快捷回复：</div>
            <div class="quick-reply-tags">
              <el-tag 
                v-for="option in quickReplyOptions" 
                :key="option"
                @click="selectQuickReply(option)"
                style="cursor: pointer; margin: 5px;"
              >
                {{ option }}
              </el-tag>
            </div>
          </div>

          <!-- 附件上传 -->
          <div class="attachment-section">
            <el-button 
              size="small" 
              icon="el-icon-paperclip"
              @click="handleAttachment"
            >
              添加附件
            </el-button>
            <span class="attachment-tip">支持图片、文档等格式</span>
          </div>
        </div>
      </div>

      <div slot="footer" class="dialog-footer">
        <el-button @click="markAsRead" v-if="currentMessage && !currentMessage.isRead">
          标记已读
        </el-button>
        <el-button @click="showDetailDialog = false">取消</el-button>
        <el-button type="primary" @click="submitReply" :loading="submitting">
          {{ submitting ? '发送中...' : '发送回复' }}
        </el-button>
      </div>
    </el-dialog>

    <!-- 快速回复对话框 -->
    <el-dialog
      title="快速回复"
      :visible.sync="showQuickReplyDialog"
      width="95%"
      center
      :close-on-click-modal="false"
      custom-class="quick-reply-dialog"
    >
      <div class="quick-reply-content">
        <div class="quick-reply-message-info">
          <div class="info-item">
            <span class="info-label">消息标题：</span>
            <span class="info-value">{{ currentMessage ? currentMessage.title : '' }}</span>
          </div>
          <div class="info-item">
            <span class="info-label">发送人：</span>
            <span class="info-value">{{ currentMessage ? currentMessage.sender : '' }}</span>
          </div>
        </div>

        <el-input
          v-model="quickReplyContent"
          type="textarea"
          :rows="6"
          placeholder="请输入回复内容..."
          maxlength="300"
          show-word-limit
        ></el-input>

        <div class="quick-reply-templates">
          <div class="template-label">常用模板：</div>
          <div class="template-list">
            <div 
              v-for="template in quickReplyTemplates" 
              :key="template.id"
              class="template-item"
              @click="useTemplate(template.content)"
            >
              <i class="el-icon-document"></i>
              <span>{{ template.name }}</span>
            </div>
          </div>
        </div>
      </div>

      <div slot="footer" class="dialog-footer">
        <el-button @click="showQuickReplyDialog = false">取消</el-button>
        <el-button type="primary" @click="submitQuickReply" :loading="submitting">
          发送
        </el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { 
  getMessageList,
  getMessageStatistics,
  markMessageAsRead,
  replyToMessage,
  getQuickReplyTemplates
} from './service';

export default {
  name: 'MessageReplyFeedback',

  data() {
    return {
      messages: [],
      statistics: {
        totalMessages: 0,
        unreadMessages: 0,
        repliedMessages: 0,
        pendingMessages: 0
      },
      currentFilter: 'all',
      filterTabs: [
        { label: '全部', value: 'all', icon: 'el-icon-s-order', count: 0 },
        { label: '未读', value: 'unread', icon: 'el-icon-warning', count: 0 },
        { label: '待处理', value: 'pending', icon: 'el-icon-time', count: 0 },
        { label: '已回复', value: 'replied', icon: 'el-icon-circle-check', count: 0 }
      ],
      
      currentMessage: null,
      showDetailDialog: false,
      showQuickReplyDialog: false,
      
      replyContent: '',
      quickReplyContent: '',
      submitting: false,
      
      quickReplyOptions: [
        '收到，马上处理',
        '已了解，感谢提醒',
        '正在跟进中',
        '已按要求完成',
        '需要进一步沟通'
      ],
      
      quickReplyTemplates: []
    };
  },

  computed: {
    filteredMessages() {
      let results = this.messages;
      
      switch (this.currentFilter) {
        case 'unread':
          results = results.filter(m => !m.isRead);
          break;
        case 'pending':
          results = results.filter(m => m.replyStatus === '待回复');
          break;
        case 'replied':
          results = results.filter(m => m.replyStatus === '已回复');
          break;
      }
      
      return results;
    }
  },

  methods: {
    // 获取消息类型图标
    getTypeIcon(type) {
      const iconMap = {
        '紧急通知': 'el-icon-bell',
        '工作指示': 'el-icon-document',
        '信息提醒': 'el-icon-message',
        '系统通知': 'el-icon-info'
      };
      return iconMap[type] || 'el-icon-message';
    },

    // 获取消息类型标签类型
    getTypeTagType(type) {
      const typeMap = {
        '紧急通知': 'danger',
        '工作指示': 'warning',
        '信息提醒': '',
        '系统通知': 'success'
      };
      return typeMap[type] || '';
    },

    // 获取优先级标签类型
    getPriorityType(priority) {
      const typeMap = {
        '高': 'danger',
        '中': 'warning',
        '低': 'info'
      };
      return typeMap[priority] || 'info';
    },

    // 获取回复状态标签类型
    getStatusTagType(status) {
      const typeMap = {
        '已回复': 'success',
        '待回复': 'warning',
        '已忽略': 'info'
      };
      return typeMap[status] || 'info';
    },

    // 筛选器变化
    handleFilterChange(filterValue) {
      this.currentFilter = filterValue;
    },

    // 查看消息详情
    viewMessageDetail(message) {
      this.currentMessage = message;
      this.showDetailDialog = true;
      this.replyContent = '';
      
      // 如果是未读消息，自动标记为已读
      if (!message.isRead) {
        this.markAsRead();
      }
    },

    // 标记为已读
    markAsRead() {
      if (!this.currentMessage || this.currentMessage.isRead) {
        return;
      }

      markMessageAsRead(this.currentMessage.id).then(() => {
        this.currentMessage.isRead = true;
        this.showToast('已标记为已读');
        this.loadStatistics();
        this.updateFilterTabCounts();
      }).catch(error => {
        this.showToast(error.message || '操作失败', 'error');
      });
    },

    // 快速回复
    quickReply(message) {
      this.currentMessage = message;
      this.quickReplyContent = '';
      this.showQuickReplyDialog = true;
    },

    // 选择快捷回复
    selectQuickReply(option) {
      this.replyContent = option;
    },

    // 使用回复模板
    useTemplate(content) {
      this.quickReplyContent = content;
    },

    // 提交回复
    submitReply() {
      if (!this.replyContent.trim()) {
        this.showToast('请输入回复内容', 'warning');
        return;
      }

      this.submitting = true;

      replyToMessage(this.currentMessage.id, this.replyContent).then(() => {
        this.submitting = false;
        this.showToast('回复发送成功');
        
        // 更新消息状态
        this.currentMessage.replyStatus = '已回复';
        if (!this.currentMessage.feedbackHistory) {
          this.currentMessage.feedbackHistory = [];
        }
        this.currentMessage.feedbackHistory.push({
          user: '我',
          content: this.replyContent,
          time: new Date().toLocaleString('zh-CN')
        });
        
        this.replyContent = '';
        this.showDetailDialog = false;
        this.loadStatistics();
        this.updateFilterTabCounts();
      }).catch(error => {
        this.submitting = false;
        this.showToast(error.message || '发送失败', 'error');
      });
    },

    // 提交快速回复
    submitQuickReply() {
      if (!this.quickReplyContent.trim()) {
        this.showToast('请输入回复内容', 'warning');
        return;
      }

      this.submitting = true;

      replyToMessage(this.currentMessage.id, this.quickReplyContent).then(() => {
        this.submitting = false;
        this.showToast('回复发送成功');
        
        // 更新消息状态
        this.currentMessage.replyStatus = '已回复';
        this.currentMessage.isRead = true;
        if (!this.currentMessage.feedbackHistory) {
          this.currentMessage.feedbackHistory = [];
        }
        this.currentMessage.feedbackHistory.push({
          user: '我',
          content: this.quickReplyContent,
          time: new Date().toLocaleString('zh-CN')
        });
        
        this.quickReplyContent = '';
        this.showQuickReplyDialog = false;
        this.loadStatistics();
        this.updateFilterTabCounts();
      }).catch(error => {
        this.submitting = false;
        this.showToast(error.message || '发送失败', 'error');
      });
    },

    // 处理附件
    handleAttachment() {
      this.showToast('附件功能开发中', 'info');
    },

    // Toast提示
    showToast(message, type = 'success') {
      this.$notify({
        title: '',
        message: message,
        type: type,
        duration: 2000,
        position: 'top-right',
        offset: 60
      });
    },

    // 加载消息列表
    loadMessages() {
      getMessageList().then(data => {
        this.messages = data;
        this.updateFilterTabCounts();
      }).catch(error => {
        console.error('加载消息列表失败', error);
      });
    },

    // 加载统计数据
    loadStatistics() {
      getMessageStatistics().then(data => {
        this.statistics = data;
      }).catch(error => {
        console.error('加载统计数据失败', error);
      });
    },

    // 加载快速回复模板
    loadQuickReplyTemplates() {
      getQuickReplyTemplates().then(data => {
        this.quickReplyTemplates = data;
      }).catch(error => {
        console.error('加载快速回复模板失败', error);
      });
    },

    // 更新筛选标签计数
    updateFilterTabCounts() {
      this.filterTabs[0].count = this.messages.length;
      this.filterTabs[1].count = this.messages.filter(m => !m.isRead).length;
      this.filterTabs[2].count = this.messages.filter(m => m.replyStatus === '待回复').length;
      this.filterTabs[3].count = this.messages.filter(m => m.replyStatus === '已回复').length;
    }
  },

  mounted() {
    const loading = this.$loading({
      lock: true,
      text: '加载中...',
      background: 'rgba(0, 0, 0, 0.7)'
    });

    Promise.all([
      this.loadMessages(),
      this.loadStatistics(),
      this.loadQuickReplyTemplates()
    ]).finally(() => {
      loading.close();
    });
  }
};
</script>

<style scoped>
.message-reply-feedback {
  background: #f5f5f5;
  min-height: 100vh;
  padding-bottom: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 统计卡片 */
.statistics-section {
  background: white;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.stat-icon i {
  font-size: 20px;
  color: white;
}

.stat-info {
  width: 100%;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: #666;
  line-height: 1.3;
}

/* 筛选区 */
.filter-section {
  background: white;
  padding: 10px 15px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.filter-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 5px;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  border: 2px solid transparent;
}

.filter-tab i {
  font-size: 20px;
  color: #666;
  margin-bottom: 5px;
}

.filter-tab span {
  font-size: 12px;
  color: #666;
}

.filter-tab.active {
  background: #e7f4ff;
  border-color: #409EFF;
}

.filter-tab.active i,
.filter-tab.active span {
  color: #409EFF;
  font-weight: 600;
}

.tab-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #F56C6C;
  color: white;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 12px;
  text-align: center;
}

/* 消息列表 */
.messages-section {
  background: white;
  padding: 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.section-header {
  margin-bottom: 15px;
}

.section-title {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.section-title i {
  font-size: 18px;
  margin-right: 6px;
  color: #409EFF;
}

.result-count {
  margin-left: auto;
  font-size: 13px;
  color: #999;
  font-weight: normal;
}

.empty-result {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-result i {
  font-size: 64px;
  color: #ddd;
  margin-bottom: 15px;
}

.empty-result p {
  font-size: 14px;
  margin: 0;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  position: relative;
}

.message-card.unread {
  background: #fff7e6;
  border-color: #ffe7ba;
}

.message-card:active {
  transform: scale(0.98);
  border-color: #409EFF;
}

.card-header {
  margin-bottom: 12px;
}

.message-type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  position: relative;
}

.unread-dot {
  width: 8px;
  height: 8px;
  background: #F56C6C;
  border-radius: 50%;
  margin-left: auto;
}

.message-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4e7ed;
}

.message-content {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.info-row {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #999;
}

.info-row i {
  margin-right: 6px;
  font-size: 13px;
  color: #409EFF;
  flex-shrink: 0;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  flex: 1;
}

.footer-right .el-button {
  padding: 0;
  color: #409EFF;
}

/* 详情对话框 */
.detail-content {
  padding: 10px 0;
}

.detail-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.detail-header {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid #409EFF;
}

.detail-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.detail-item .label {
  color: #666;
  min-width: 90px;
  flex-shrink: 0;
}

.detail-item .value {
  color: #333;
  flex: 1;
}

.message-content-detail {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  white-space: pre-wrap;
}

/* 反馈时间线 */
.feedback-timeline {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feedback-item {
  display: flex;
  gap: 12px;
}

.feedback-time {
  font-size: 12px;
  color: #999;
  min-width: 120px;
  flex-shrink: 0;
}

.feedback-content {
  flex: 1;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
}

.feedback-user {
  font-size: 13px;
  font-weight: 600;
  color: #409EFF;
  margin-bottom: 5px;
}

.feedback-text {
  font-size: 13px;
  color: #333;
  line-height: 1.5;
}

/* 快捷回复选项 */
.quick-reply-options {
  margin-top: 15px;
}

.quick-reply-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.quick-reply-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* 附件区域 */
.attachment-section {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.attachment-tip {
  font-size: 12px;
  color: #999;
}

/* 对话框底部 */
.dialog-footer {
  display: flex;
  gap: 10px;
  padding: 0;
}

.dialog-footer .el-button {
  flex: 1;
  margin: 0;
}

/* 快速回复对话框 */
.quick-reply-content {
  padding: 10px 0;
}

.quick-reply-message-info {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.info-item {
  display: flex;
  margin-bottom: 8px;
  font-size: 13px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-label {
  color: #666;
  min-width: 80px;
  flex-shrink: 0;
}

.info-value {
  color: #333;
  flex: 1;
}

.quick-reply-templates {
  margin-top: 15px;
}

.template-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.template-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.template-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.template-item:active {
  transform: scale(0.98);
  border-color: #409EFF;
  background: #e7f4ff;
}

.template-item i {
  font-size: 16px;
  color: #409EFF;
}

.template-item span {
  font-size: 13px;
  color: #333;
}

/* 对话框样式优化 */
.message-reply-feedback >>> .el-dialog {
  border-radius: 12px;
}

.message-reply-feedback >>> .el-dialog__header {
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.message-reply-feedback >>> .el-dialog__title {
  font-size: 16px;
  font-weight: 600;
}

.message-reply-feedback >>> .el-dialog__body {
  padding: 20px;
  max-height: calc(90vh - 150px);
  overflow-y: auto;
}

.message-reply-feedback >>> .el-dialog__footer {
  padding: 15px 20px;
  border-top: 1px solid #f0f0f0;
}
</style>

